<template>
	<view>
		<view @click="toPage(item,index)" v-for="(item,index) in list " :key="index"
			class="p-20 br-10 bg-white box-main-list pos-r mb-10">
			<view>
				<image class="br-100p" :src="item.logo" mode="aspectFit" style="width: 134rpx;height: 134rpx;"></image>
			</view>
			<view class="ml-40">
				<view class="c-000 fw fs-36">{{item.nickname || ''}}</view>
				<view class="flex ac sb mt-20" style="width: 56vw;">
					<view>
						<text style="color: #225BFA;" class="iconfont icon-yonghu"></text>
						<text class="c-666 fw ml-10">成员：</text>
						<text class="c-666 fw">{{item.userRela[0].num || 0}}</text>
					</view>
					<view>
						<text style="color: #FF9325;" class="iconfont icon-jinbi1"></text>
						<text class="c-666 fw ml-10">销售额：</text>
						<text class="c-666 fw">{{item.sale[0].order_num || 0}}</text>
					</view>
				</view>
			</view>
			<view class="pos-a" style="right: 20rpx;">
				<text class="iconfont icon-jiantou c-999"></text>
			</view>
		</view>

		<!-- 暂无数据显示 -->
		<emptyPage v-if="list.length == 0" title="暂无记录～"></emptyPage>
		<!-- end -->

	</view>
</template>

<script>
	import emptyPage from "@/pages/extend/components/emptyPage.vue";
	import {
		userComList,
	} from '@/api/extend.js';
	export default {
		components: {
			emptyPage
		},
		data() {
			return {
				list: [],
			}
		},
		onLoad() {
			this.userComListFunc();
		},
		methods: {
			userComListFunc() {
				userComList().then(res => {
					this.list = res.data;
				})
			},
			toPage(item, index) {
				uni.navigateTo({
					url: `/pages/extend/chamber/chamber_earnings_detail?admin_id=${item.id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box-main-list {
		margin: 20rpx;
		width: calc(100% - 40rpx);
		height: 200rpx;
		display: flex;
		align-items: center;
	}
</style>